﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MESMian.Migrations
{
    /// <inheritdoc />
    public partial class jiandangText : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<int>(
                name: "Status",
                table: "Users",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "Users",
                type: "dateTime",
                nullable: false,
                defaultValueSql: "GETDATE()",
                oldClrType: typeof(DateTime),
                oldType: "dateTime");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "ProductSpecs",
                type: "datetime",
                nullable: false,
                defaultValueSql: "GETDATE()",
                comment: "创建时间，默认值为当前时间",
                oldClrType: typeof(DateTime),
                oldType: "dateTime default getdate()",
                oldComment: "创建时间，默认值为当前时间");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<int>(
                name: "Status",
                table: "Users",
                type: "int",
                nullable: false,
                oldClrType: typeof(int),
                oldType: "int",
                oldDefaultValue: 0);

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "Users",
                type: "dateTime",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "dateTime",
                oldDefaultValueSql: "GETDATE()");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "ProductSpecs",
                type: "dateTime default getdate()",
                nullable: false,
                comment: "创建时间，默认值为当前时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime",
                oldDefaultValueSql: "GETDATE()",
                oldComment: "创建时间，默认值为当前时间");
        }
    }
}
